package com.bkhc.common.repository;


import com.bkhc.common.entity.UserRole;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserRoleRepository extends JpaRepository<UserRole,String> , JpaSpecificationExecutor<UserRole> {

    List<UserRole> findByRoleCode(String roleCode);

    UserRole findByUserIdAndRoleCode(String userId, String roleCode);

    void deleteByUserId(String userId);
}
